class Thread(db.Model):
    """
    common thread used by other model
    """
    
    thread_id=db.StringProperty(multiline=False, required=True)    
    title=db.StringProperty()            
    created =db.DateTimeProperty(auto_now_add=True)    
    lst_page_url=db.StringListProperty()
    page_cnt=db.IntegerProperty(required=True,default=0)    # if FORM page,it means form counts
    latest_post_date=db.DateTimeProperty(default    =ascii_to_datetime("1970-01-01 00:00:00"))
    chrAuthor=db.StringProperty()
    

class TianyaThread(Thread):  
    """
    for tianya only
    """  
    page_type=db.StringProperty(multiline=False)  #LINK or FORM 
    last_scan_post=db.DateTimeProperty()    
    last_scan_thread=db.DateTimeProperty() 
    status=db.StringProperty(required=True,default  = xmw.Thread_Status.INIT)  
    offset =db.IntegerProperty(default =0)